In Mudbox, textures are confined to a 0 to 1 UV space. If an
object has texture coordinates that go outside this 0-1 space, then
multiple texture tiles are used to represent the texture, one tile
per unit region in texture space. This class is a container for all
the tiles that comprise a texture.
Mudbox also uses paint layers (where each layer would have the
same number of tiles). An instance of the TexturePool class can
therefore also be a LayerContainer. In this
case it is possible to cast a TexturePool pointer into a
pointer to a LayerContainer instance,
and use the LayerContainer pointer
to determine the number of layers and get them. Each pointer to a
layer object can then be cast into a TexturePool object again,
which then will be the physical paint layer. See the Material class
documentation for more details.
|
Public Types
|
enum |
RenderMode { renderModeConstantColor,
renderModeTexture,
renderModeVertexColor
} |
enum |
Location { locationUnknown,
locationGPU, locationCPU,
locationDisk } |
Public Member Functions
|
virtual const mudbox::ClassDesc
* |
RuntimeClass (void)
const |
virtual QString |
Name (void) const |
|
Returns the name of the texturepool.
|
virtual void |
SetName (const QString
&sName) |
|
Sets the name of the texture pool.
|
virtual unsigned int |
RenderMode (void)
const |
|
Returns the render mode of the texture pool.
0=constant color, 1=texture, 2=vertex color.
|
virtual void |
SetRenderMode (unsigned
int iMode) |
|
Sets the render mode for the texture pool.
|
virtual void |
SetLocation (unsigned
int iLocation) |
|
Sets the location for the texture pool.
|
virtual unsigned int |
Location (void) |
|
Gets the location for the texture pool.
|
virtual TexturePool
& |
operator= (TexturePool
&cT) |
virtual int |
Width (void) const |
|
Returns the number of tiles in a row.
|
virtual void |
SetWidth (int
iWidth) |
|
Sets the number of tiles in a row.
|
virtual void |
SetFileName (const
QString &sFileName) |
|
Set the file name mask for the texture pool.
|
virtual const QString & |
FileName (void)
const |
|
Returns the file name mask for the texture
pool. The name may contain tile wildcards (i, x, y).
|
virtual void |
Save (const QString
&sFileName="", const QString &sFormat="", Material *m=NULL) |
|
Saves the textures into files on the disk.
|
virtual void |
SetDirty (bool
bDirty) |
|
Sets the dirty status of the texture.
|
virtual bool |
IsDirty (void) |
|
Gets the dirty status of the texture.
|
virtual void |
AddToDirtyArea (const
Vector
&cPoint) |
|
Adds a point to the dirty region of this
texture pool.
|
virtual void |
Reload (void) |
|
Reload the pool from the files based on the
current file name mask.
|
virtual void |
SetContentChanged
(void) |
|
Sets a flag to say that the texturepool has
been modified.
|
virtual bool |
IsContentChanged
(void) |
|
Returns true if the texturepool has been
modified since the last file save.
|
virtual unsigned int |
TileCount (void)
const |
|
Returns the number of created tiles so far.
These tiles can overlap.
|
virtual class Texture * |
Tile (unsigned int
iTileIndex) |
|
Returns a pointer to a specified tile. Do
not delete this pointer.
|
virtual class Texture * |
Tile (const AxisAlignedBoundingBox
&cTCArea, bool bAlloc=true) |
|
Returns a texture tile for a coordinate
range. Attempts to create the texture if it does not yet exist.
|
virtual AxisAlignedBoundingBox |
TileArea (unsigned int
iTileIndex) const |
|
Returns the UV area associated with a tile.
|
virtual TextureMixer * |
Mixer (void) const |
|
Returns a mixed object for the pool.
|
virtual int |
BlendMode (void)
const |
|
Returns the blending mode of the pool.
|
virtual void |
SetBlendMode (int
iMode) |
|
Sets the blending mode.
|
virtual void |
SetMaterial (Material
*pMaterial) |
virtual Material * |
GetMaterial ()
const |
Static Public Member Functions
|
const mudbox::ClassDesc
* |
StaticClass (void) |
mudbox::Node
* |
CreateInstances
(unsigned int iCount=1) |
Protected Member Functions
|
|
TexturePool (void) |
|
Constructor. Do not use it directly; Use
CreateInstance()
instead.
|
mudbox::TexturePool mudbox::TexturePool
mudbox::TexturePool mudbox::TexturePool mudbox::TexturePool
mudbox::TexturePool mudbox::TexturePool mudbox::TexturePool
mudbox::TexturePool mudbox::TexturePool
mudbox::TexturePool mudbox::TexturePool
mudbox::TexturePool mudbox::TexturePool mudbox::TexturePool
mudbox::TexturePool mudbox::TexturePool mudbox::TexturePool
mudbox::TexturePool mudbox::TexturePool